package com.ruoyi.service.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.service.project.entity.ProjectLaborEntity;
import java.util.List;
import java.util.Map;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 项目岗位招聘情况 服务类
 * </p>
 *
 * @author Zane
 * @since 2025-10-14
 */
public interface ProjectLaborService extends IService<ProjectLaborEntity> {

  /**
   * 已经招聘的人员
   *
   * @param projectId 项目ID
   * @return 招聘人员
   */
  List<ProjectLaborEntity> getHiredByProjectId(String projectId);

  /**
   * 待招募人员
   *
   * @param projectId 项目ID
   * @return 招聘人员
   */
  List<ProjectLaborEntity> couldHiredByProjectId(String projectId);

  /**
   * 获得用户在项目下的招募信息(在岗)
   *
   * @param projectId 项目ID
   * @return 招募信息
   */
  List<ProjectLaborEntity> getWorkingLaborByProjectId(String projectId);

  long countByLaborIdAndProjectId(@NotBlank(message = "成员ID不能为空") Long laborId,
      @NotBlank(message = "项目Id不能为空") String projectId);

  Long countUserInProjectPost(@NotBlank(message = "项目ID不能为空") String projectId,
      @NotNull(message = "员工ID不能为空") Long laborId,
      @NotBlank(message = "岗位不能为空") String postName);

  List<String> getCompleteProject(Long userId);

  List<String> getApplyProject(Long userId);

  List<String> getExecutionCount(Long userId);

  Map<String, Long> getProjectLaborCountMap(List<String> projectIdList);
}
